#pragma once
#include "HSSecuTradeApi.h"
#include "HSSecuStruct.h"

class TestCaseInterface
{
private:

public:
    TestCaseInterface() {}
    ~TestCaseInterface() {}

    virtual void Run() = 0;

    // void ReqAuthenticate(CHSSecuReqAuthenticateField pReqAuthenticate,
    //                      int nRequestID)
    // {
    //     CHSSecuRspAuthenticateField *prspAuthenticate = new CHSSecuRspAuthenticateField();
    //     CHSSecuRspInfoField *prspInfo = new CHSSecuRspInfoField();
    //     m_pSpi->OnRspAuthenticate(prspAuthenticate, prspInfo, nRequestID, false);
    // }

#ifdef REQ_FUNCTION2
#undef REQ_FUNCTION2
#endif
#ifdef REQ_FUNCTION
#undef REQ_FUNCTION
#endif

// 定义函数宏
#define REQ_FUNCTION2(functionName, spiFunction, reqParam, RspFiled)  \
    virtual void functionName(CHSSecu##reqParam p##reqParam, int nRequestID) = 0;

#define REQ_FUNCTION(name) \
    REQ_FUNCTION2(Req##name, OnRsp##name, Req##name##Field, CHSSecuRsp##name##Field)

    REQ_FUNCTION(Authenticate)
    REQ_FUNCTION(UserLogin)
    REQ_FUNCTION(QryStkAcct)
    REQ_FUNCTION(UserPasswordUpdate)
    REQ_FUNCTION(Transfer)
    REQ_FUNCTION(FundTrans)
    REQ_FUNCTION(FundAlloc)
    REQ_FUNCTION(StockTrans)
    REQ_FUNCTION(OrderInsert)
    REQ_FUNCTION(OrderAction)
    REQ_FUNCTION(QryHold)
    REQ_FUNCTION(QryFund)
    REQ_FUNCTION(QryOrder)
    REQ_FUNCTION(QryTrade)

    REQ_FUNCTION(QryStkcode)
    REQ_FUNCTION(QryEquity)
    REQ_FUNCTION(QryEtfcode)
    REQ_FUNCTION(QryEtfcomponent)
    REQ_FUNCTION(QryImpawnDetail)
    /// Description:债券入库集中度查询
    REQ_FUNCTION(QryBondImpawnConc)

    /// Description:现金还款
    REQ_FUNCTION(CashRepay)

    /// Description:可融资金查询
    REQ_FUNCTION(QryEnfinFund)

    /// Description:可融证券查询
    REQ_FUNCTION(QryEnsloStock)

    /// Description:担保证券查询
    REQ_FUNCTION(QryCreditCollateral)

    /// Description:标的证券查询
    REQ_FUNCTION(QryCreditUnderlying)

    /// Description:融资融券费率查询
    REQ_FUNCTION(QryCreditRate)

    /// Description:信用资产信息查询
    REQ_FUNCTION(QryCreditAsset)

    /// Description:两融合约查询
    REQ_FUNCTION(QryCompact)

    /// Description:组合报单录入
    REQ_FUNCTION(ComOrderInsert)


    /// Description:合约展期申请
    REQ_FUNCTION(CompactApply)

    /// Description:新股申购代码查询
    REQ_FUNCTION(QryApplycode)

    /// Description:主柜台资金查询
    REQ_FUNCTION(QryFundUF20)

    /// Description:资金流水查询
    REQ_FUNCTION(QryFundRealJour)

    /// Description:合约流水表查询
    REQ_FUNCTION(QryCompactRealJour)

    /// Description:可买卖数量获取
    REQ_FUNCTION(QryMaxEntradeNum)

    /// Description:股份流水查询
    REQ_FUNCTION(QryStockRealJour)

    /// Description:银行账户查询
    REQ_FUNCTION(QryBankAccount)

    /// Description:港股通客户个人交易汇率查询
    REQ_FUNCTION(QryHKSecurate)

    /// Description:担保提交证券可用数量查询
    REQ_FUNCTION(QryAssureAmount)

    /// Description:担保证券可返回数量查询
    REQ_FUNCTION(QryAssureBackAmount)

    /// Description:对端快速交易中心资金查询
    REQ_FUNCTION(QryFundPeer)

    /// Description:港股非交易报单录入
    REQ_FUNCTION(HkntOrderInsert)

    /// Description:港股非交易报单撤单
    REQ_FUNCTION(HkntOrderAction)

    /// Description:港股非交易委托查询
    REQ_FUNCTION(QryHkntOrder)

    /// Description:港股非交易成交查询
    REQ_FUNCTION(QryHkntTrade)

    /// Description:港股权益信息查询
    REQ_FUNCTION(QryAuthority)

    /// Description:港股公司行为申报参考数量查询
    REQ_FUNCTION(QryHkReferAmount)

    /// Description:港股参考可投票数量查询
    REQ_FUNCTION(QryHkVoteReferAmount)

    /// Description:港股投票当日申报结果查询
    REQ_FUNCTION(QryHkVoteBack)

    /// Description:港股投票截止日投票结果查询
    REQ_FUNCTION(QryHkVoteResult)

    /// Description:银行转账查询
    REQ_FUNCTION(QryTransfer)

    /// Description:银行余额查询
    REQ_FUNCTION(QryBankBalance)
};
